package com.water.wfo.user.api;

import com.water.wfo.component.api.entity.response.BasicResponse;
import com.water.wfo.sys.pojo.dto.LoginUserInfoDto;
import com.water.wfo.sys.pojo.entity.UserEntity;
import com.water.wfo.sys.pojo.request.UserQueryRequest;
import com.water.wfo.sys.pojo.request.UserRequest;
import com.water.wfo.sys.pojo.response.UserResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
import java.util.Map;

/**
 * packageName com.water.wfo.user.api
 *
 * @author junhuili
 * @version JDK 8
 * @date 2024/5/18
 * @description TODO
 */
@RequestMapping("/user")
public interface UserApi {
    /*
     * @Author junhuili
     * @Description test服务台启动
     * @param map
     * @Return com.water.wfo.component.api.entity.response.BasicResponse<java.lang.String>
     * @Date 2024/5/20 16:36
     *
     */
    @PostMapping("/queryUser")
    BasicResponse<String> queryUser(Map<String ,String> map);
    /*
     * @Author junhuili
     * @Description 查询所有用户
     * @param
     * @Return com.water.wfo.component.api.entity.response.BasicResponse<java.util.List<com.water.wfo.user.pojo.UserEntity>>
     * @Date 2024/5/20 16:36
     *
     */
    @PostMapping("/queryAll")
    BasicResponse<List<UserEntity>> queryAll(Map<String ,String> map);
    /*
     * @Author Administrator
     * @Description
     * * @param map
     * @Return com.water.wfo.component.api.entity.response.BasicResponse<java.lang.String>
     * @Date 2024/7/20 15:58
     *
     */
    @PostMapping("/login")
    BasicResponse<LoginUserInfoDto> login(Map<String ,String> map);
    /*
     * @Author Administrator
     * @Description
     * * @param map
     * @Return com.water.wfo.component.api.entity.response.BasicResponse<java.lang.String>
     * @Date 2024/7/20 15:58
     *
     */
    @PostMapping("/loginOut")
    BasicResponse<String> loginOut(Map<String ,String> map);
    /**
     * @Author Administrator
     * @Description 查询用户结果集
     * * @param request
     * @Return com.water.wfo.component.api.entity.response.BasicResponse<com.water.wfo.sys.pojo.response.UserResponse>
     * @Date 2024/8/27 17:32
     *
     */
    @PostMapping("/queryUserListInfo")
    BasicResponse<UserResponse> queryUserListInfo(UserQueryRequest request);

    @PostMapping("/addUserInfo")
    BasicResponse<String> addUserInfo(UserRequest userEntity);

    @PostMapping("/editUserInfo")
    BasicResponse<String> editUserInfo(UserRequest userEntity);

    @GetMapping("/resetPassword")
    BasicResponse<String> resetPassword(Long userId);

    @GetMapping("/deleteUser")
    BasicResponse<String> deleteUser(Long userId);

    @PostMapping("/batchDeleteUser")
    BasicResponse<String> batchDeleteUser(Map<String,Object> map);
}
